<?php

namespace app\index\controller;
use app\common\controller\Frontend;


/**
 * 文章管理
 *
 * @icon fa fa-circle-o
 */
class Article extends Frontend
{
    protected $model = null;
    public function _initialize()
    {
        parent::_initialize();
        $this->model = model('Article');
    }

    /**
     * 详情
     * @param null $aid
     * @return string
     * @throws \think\Exception
     */
    public function detail($aid = null)
    {
        $res = $this->model->where('id', $aid)->find();
        $this->assign('data', $res);
        return $this->view->fetch();
    }


}
